<!DOCTYPE html>
<html lang="en">
	<head>
		<meta charset="UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=edge" />
		<meta name="viewport" content="width=device-width, initial-scale=1.0" />
		<title>Document</title>
	</head>
	<body>
		<script>
			// 用于获取对象自身所有的属性
			let obj = {
				pname: 'v',
				lname: 'ae',
				age: 35,
			};

			let arr = Object.keys(obj);
			console.log(arr);

			arr.forEach(function (value) {
				console.log(value);
			});
		</script>
	</body>
</html>
